Sort Objects into Three Groups